package com.sc.sc250601.cook.service.impl;

import com.sc.sc250601.cook.mapper.UserMapper;
import com.sc.sc250601.cook.pojo.User;
import com.sc.sc250601.cook.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> getUsers(String username) {
        return userMapper.getUsers(username);
    }

    public User Login(User u) {
        return userMapper.Login(u);
    }

    public int Reg(User u) {
        return userMapper.insert(u);
    }
}
